#! /bin/sh

BASEDIR="$(dirname "$(readlink -f "$0")")"

JAVACMD="$BASEDIR/runtime/bin/java"

exec "$JAVACMD" \
  -splash:"$BASEDIR/resources/images/splashscreen.png" \
  -cp "$BASEDIR/libs/*:$BASEDIR/plugins/*" \
  -Xmx4096M \
  -XX:+UnlockExperimentalVMOptions \
  -XX:+UseShenandoahGC \
  -XX:ShenandoahGCHeuristics=compact \
  -XX:ShenandoahAllocationThreshold=20 \
  -Dapp.name="binjr" \
  -Dapp.pid="$$" \
  -Dapp.home="$BASEDIR" \
  -Dbasedir="$BASEDIR" \
  -Dbinjr.portable=true \
  "eu.binjr.core.Binjr" \
  "--packaging=LINUX_TAR" \
  "$@"
